package com.mf.service;


import com.baomidou.mybatisplus.extension.service.IService;
import io.github.heollhai.common.entity.bo.PermissionBo;
import io.github.heollhai.common.entity.request.publicRequest.PublicBindingIdRequest;
import io.github.heollhai.common.entity.vo.permissionTree.RouteVo;

import java.util.List;

/**
 * 权限表 服务类
 *
 * @author mf
 * @since 2024-08-06
 */
public interface IPermissionService extends IService<PermissionBo> {
    /**
     * 查询所有权限
     */
    List<PermissionBo> findListPermission();

    /**
     * 查询所有菜单权限(树结构)
     */
    List<RouteVo> findTreeMenuList();

    /**
     * 根据id删除权限
     */
    Integer deleteById(Integer permissionId);

    /**
     * @return 根据父级id查询
     */
    List<PermissionBo> findByPid(Integer pid);
    /**
     * @return 新增权限
     */
    Boolean submit(PermissionBo permissionBo);

    List<Integer> findListByRoleId(Integer roleId);

    /**
     * 查询所有权限(树结构)
     */
    List<RouteVo> findTreeList();

    /**
     *  根据角色id绑定权限
     */
    Integer permissionIdsBindingRoleId(PublicBindingIdRequest bindingIdRequest);
}
